package com.wu.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wu.entity.sys.SResourceDo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 资源表 Mapper 接口
 * </p>
 *
 * @author wujilu
 * @since 2020-11-24
 */
public interface SResourceMapper extends BaseMapper<SResourceDo> {

    List<SResourceDo> getSResourceListByName(@Param("resourceName") String resourceName);

    int judgeIsExistResourceName(@Param("resourceName") String resourceName,@Param("resourceId") Long resourceId);

    List<SResourceDo> getSResourceByUserId(@Param("userId") Long userId, @Param("ignore") Integer ignore);

    List<SResourceDo> getSResourceByIgnore(@Param("ignore") Integer ignore);

    int countSonByParentCode(@Param("parentCode") String parentCode);
}
